<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The GearmanTask class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="gearmanjob.workloadsize.html">« GearmanJob::workloadSize</a></li>
      <li style="float: right;"><a href="gearmantask.construct.html">GearmanTask::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.gearman.html">Gearman</a></li>
    <li>The GearmanTask class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.gearmantask" class="reference">

 <h1 class="title">The GearmanTask class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL gearman &gt;= 0.5.0)</p>


  <div class="section" id="gearmantask.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    
   </p>
  </div>


  <div class="section" id="gearmantask.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">GearmanTask</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="gearmantask.construct.html" class="methodname">__construct</a></span>()</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.create.html" class="methodname">create</a></span>(): <span class="type"><span class="type"><a href="class.gearmantask.html" class="type GearmanTask">GearmanTask</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.data.html" class="methodname">data</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.datasize.html" class="methodname">dataSize</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.function.html" class="methodname">function</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.functionname.html" class="methodname">functionName</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.isknown.html" class="methodname">isKnown</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.isrunning.html" class="methodname">isRunning</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.jobhandle.html" class="methodname">jobHandle</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.recvdata.html" class="methodname">recvData</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$data_len</code></span>): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.returncode.html" class="methodname">returnCode</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.senddata.html" class="methodname">sendData</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.sendworkload.html" class="methodname">sendWorkload</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.taskdenominator.html" class="methodname">taskDenominator</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.tasknumerator.html" class="methodname">taskNumerator</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.unique.html" class="methodname">unique</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="gearmantask.uuid.html" class="methodname">uuid</a></span>(): <span class="type">string</span></div>

   }</div>


  </div>

 </div>

 
























































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="gearmantask.construct.html">GearmanTask::__construct</a> — Create a GearmanTask instance</li><li><a href="gearmantask.create.html">GearmanTask::create</a> — Create a task (deprecated)</li><li><a href="gearmantask.data.html">GearmanTask::data</a> — Get data returned for a task</li><li><a href="gearmantask.datasize.html">GearmanTask::dataSize</a> — Get the size of returned data</li><li><a href="gearmantask.function.html">GearmanTask::function</a> — Get associated function name (deprecated)</li><li><a href="gearmantask.functionname.html">GearmanTask::functionName</a> — Get associated function name</li><li><a href="gearmantask.isknown.html">GearmanTask::isKnown</a> — Determine if task is known</li><li><a href="gearmantask.isrunning.html">GearmanTask::isRunning</a> — Test whether the task is currently running</li><li><a href="gearmantask.jobhandle.html">GearmanTask::jobHandle</a> — Get the job handle</li><li><a href="gearmantask.recvdata.html">GearmanTask::recvData</a> — Read work or result data into a buffer for a task</li><li><a href="gearmantask.returncode.html">GearmanTask::returnCode</a> — Get the last return code</li><li><a href="gearmantask.senddata.html">GearmanTask::sendData</a> — Send data for a task (deprecated)</li><li><a href="gearmantask.sendworkload.html">GearmanTask::sendWorkload</a> — Send data for a task</li><li><a href="gearmantask.taskdenominator.html">GearmanTask::taskDenominator</a> — Get completion percentage denominator</li><li><a href="gearmantask.tasknumerator.html">GearmanTask::taskNumerator</a> — Get completion percentage numerator</li><li><a href="gearmantask.unique.html">GearmanTask::unique</a> — Get the unique identifier for a task</li><li><a href="gearmantask.uuid.html">GearmanTask::uuid</a> — Get the unique identifier for a task (deprecated)</li></ul>
</div>
</div></div></body></html>